package cs.oor;

import android.content.Context;
import android.os.Looper;
import android.widget.Toast;

public class OrderRetrievalThread extends Thread {

    protected Context context;
    protected int iterator = 0;

    public OrderRetrievalThread(Context context) {
        this.context = context;
    }
    
    public void run() {
        Looper.prepare();

        while (true) {
            try {
                Toast.makeText(context, "running iteration: " +String.valueOf(iterator), Toast.LENGTH_SHORT);
            } catch (Exception e) {
                Toast.makeText(context, "Thread interrupted", Toast.LENGTH_LONG);
            }
            
            iterator++;
            Looper.loop();
        }
        

        
    }
}
